const http = require("http");
var data = require("./users.json");
const sto = require("./把字符串转换成对象");
const server = http.createServer((req, res) => {
  res.setHeader("content-type", "text/html;charset=utf-8");
  if (req.url !== "/favicon.ico") {
    let qs = sto(req.url);
    console.log(qs);
  }
  res.write("获取到了参数");
  res.end();
});

server.listen(8080);
